<pre>
<?php
require_once("include.php");

$sql = "select name,pin from employee";
$l = sqlreadarray($sql);
foreach ($l as $rec) {
 $n = $rec[0];
 $pin = "";
 echo $n;
 for ($i=0;$i<strlen($n);$i++) {
  $c = ord(strtoupper($n[$i]))-64;
  if ($c < 10 && $c > 0) {  
   if (!isset($pin[$c])) {
//   echo $c."<br>";
   $pin[$c] = "-";
   }
  }
 }
 for ($i = 1;$i<10;$i++) {
  if (!isset($pin[$i])) {
   $pin[$i] = "-";
  }
 }
 $c = 1;
 $ans = "";
 foreach ($pin as $k=>$v) {
  $ans .= $k;
  $c += 1;
  if ($c > 3) {break;}
 }
 print($ans)." ".$rec[1]."\n";
}
?>
